<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
        
        <style>
            .outergridvalidationcolumn {
                padding: 0px 30px 10px 0px;
            }
        </style>

    <a4j:outputPanel ajaxRendered="true">
        <h:messages style="color:red" />
    </a4j:outputPanel>
    <h:panelGrid columns="2" columnClasses="outergridvalidationcolumn">

        <h:form id="form1">
                <h:panelGrid columns="2">
                    <h:outputText value="Name" />
                    <h:inputText value="#{userBean.name}">
                        <a4j:support event="onkeyup" reRender="outname" />
                    </h:inputText>
                    <h:outputText value="Job" />
                    <h:inputText  required="true" id="job2" value="#{userBean.job}" />
                </h:panelGrid>
        </h:form>

        <h:form id="form2">
            <h:panelGrid columns="2">
                <h:outputText value="Name" />
                <a4j:region>
                    <h:inputText value="#{userBean.name}">
                        <a4j:support event="onkeyup" reRender="outname" />
                    </h:inputText>
                </a4j:region>
                <h:outputText value="Job" />
                <h:inputText   required="true"  id="job1"  value="#{userBean.job}" />
            </h:panelGrid>
        </h:form>

    </h:panelGrid>
    <h:outputText id="outname" style="font-weight:bold" value="Typed Name: #{userBean.name}" />
    <br />
</ui:composition>
<body>
</body>
</html>
